﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<MuaChung.Models.CouponDetailMin>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	SearchCouponResult
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<link href="/Content/ListCoupon.css" rel="stylesheet" type="text/css" />
    <h2>
        Kết quả tìm kiếm</h2>
    <div id="MainLeft" style="min-height:100px;opacity:1;">
        <%if (ViewData["result"] == "NoItem")
          {%>
             <div style="color:Blue">Không tìm thấy kết quả nào có từ <span style="color:Red">"<%: ViewData["key"] %>"</span> mà bạn cần tìm!</div>
        <%}
          else if (ViewData["result"] == "NoKeyword")
          {%>
              <div style="color:Blue">Vui lòng nhập từ khóa để tìm kiếm!</div>
        <%}
          else          
          { %>
        <div id="PagingContent1" class="PagingContent">
            <%string i = ViewData["cp"].ToString();
              string s = ViewData["ps"].ToString();
              string k = HttpUtility.UrlEncodeUnicode(ViewData["key"].ToString());%>
            <script type="text/javascript">
                GetContent("/Share/Paging?type=searchCoupon&currentPage=<%:i %>&pageSize=<%: s %>&param=<%: k%>", "PagingContent1");
            </script>
        </div>
        <div id="DisplayList">
            <ul class="ul_listBestPrice">
                <%foreach (var item in Model)
                  {%>
                <li class="li_ListBP">
                    <div class="div_topListBP">
                    </div>
                    <div class="div_bodyListBP">
                        <div class="div_bodyLineRound">
                        </div>
                        <div class="div_infoListBP">
                            <div class="div_LBodyListBP">
                                <div class="div_TietKiem">
                                    <strong class="styleText14">Tiết Kiệm</strong><br>
                                    <strong class="styleText15">
                                        <%:item.tyLeGiam%>%</strong></div>
                                <div class="divPrice">
                                    <span class="styleText17">Giá trị:<strong class="StyleTextGT lineHorizontal styleText13"><%: item.giaGoc%>,000</strong></span><div
                                        class="div_VND GTVND">
                                        <strong class="styleText16">VND</strong></div>
                                    <br>
                                    <span class="styleText17 spTietKiem">Tiết kiệm:<strong class="StyleTextGT styleText13"><%: item.giaGoc - item.giaTot%>,000</strong></span><div
                                        class="div_VND TKVND">
                                        <strong class="styleText16">VND</strong></div>
                                </div>
                                <div class="div_infoMoney">
                                    <div class="div_TextInfoMoney">
                                        <p class="styleText14">
                                            <strong>Còn Lại</strong><strong class="strTextVND">VND</strong></p>
                                        <p class="pGiaTien">
                                            <strong class="styleText5">
                                                <%: item.giaTot%>,000</strong></p>
                                    </div>
                                </div>
                                <p class="color9 styleText9 pWasBuyer">
                                    <strong>
                                        <%: item.soLuongDatHang%></strong></p>
                                <p class="pWasBuyer color9 styleText14">
                                    Người mua giá tốt</p>
                            </div>
                            <div class="div_RBodyListBP">
                                <p class="pTextInfoList styleText8">
                                    <a title="<%: item.tenSP %> - Phiếu <%: item.tenLoai %> &ndash; Giảm <%: item.tyLeGiam %>%."
                                        href="/Coupon/CouponDetail?cid=<%: item.cid %>">
                                        <%: item.tenSP%>
                                        - Phiếu
                                        <%: item.tenLoai%>
                                        &ndash; Giảm
                                        <%: item.tyLeGiam%>%.</a></p>
                                <div class="div_imgListBP">
                                    <a href="/Coupon/CouponDetail?cid=<%: item.cid %>">
                                        <%if (item.trangThai == "ChayHang")
                                          {%>
                                        <i class="iChayHang"></i>
                                        <%} %>
                                        <img width="229" height="140" src="<%: item.hinhAnh%>" alt="<%: item.tenSP %>"></a></div>
                                <p class="styleText13 pDayCity">
                                    TP Hồ Chí Minh -
                                    <%: item.tgBatDau.ToShortDateString()%></p>
                            </div>
                        </div>
                    </div>
                    <div class="div_bottomListBP">
                    </div>
                </li>
                <%} %>
            </ul>
        </div>
        <div id="PagingContent2" class="PagingContent">            
            <script type="text/javascript">
                GetContent("/Share/Paging?type=searchCoupon&currentPage=<%:i %>&pageSize=<%: s %>&param=<%: k%>", "PagingContent2");
            </script>
        </div>
        <%} %>
    </div>

</asp:Content>

